home *** CD-ROM | disk | FTP | other *** search
- Path: news.cc.uic.edu!sunphy1!olczyk
- From: olczyk@sunphy1 (Jung Oh)
- Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
- Subject: Re: C++ with Zapp vs. Delphi
- Followup-To: comp.lang.c++,comp.lang.pascal.delphi.misc
- Date: 18 Jan 1996 07:27:29 GMT
- Organization: University of Illinois at Chicago
- Message-ID: <4dksp1$3d6c@tigger.cc.uic.edu>
- References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <DBk8wg2yqjbB083yn@iaccess.za> <4d7pmb$48c8@tigger.cc.uic.edu> <4dk38h$gdr@merlin.delphi.com>
- NNTP-Posting-Host: sunphy1.phy.uic.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- pbe@pobox.com wrote:
- : Oh, but you'll accept MS's claim that VB4 is OO? (One of their TechEd'
- : s in an article even said it was not OO)
- Duh---deep deep question considering the fact that I never once
- said anything about VB4. Very funny considering that I recently trashed a local
- consulting company which sold their methodology -- combining VB with
- structured analysis and design-- as OO.
-
- : MI is not a requirement for OO, and many don't think it should exist at
- : all. "Goto of the 90's".
- Mostly Smalltalk programers, who would also say that static typing shouldn't
- exist.
-
- : Is my car not a car because I don't have a two side mirrors? (Mine does
- : though)
- If the mirrors you have fail to give a good view you'll get a ticket.
- If the mirrors are from a different car and don't fit right that may happen.
- More to the point. If the cylinders are from a different engine type
- as the cylinders then most likely the engine won't work. But if it does
- work, there is a high probability that the engine will sieze or burst into
- flames. It's not enough to just collect parts. The parts have to work
- together well. In programming, it's not enough to have unit tests. You have
- to run system tests too.
- SI and static typing are parts that do not work together well.
-
-
- : >The lack of multiple inheritence means that some objects cannot
- : >send messages to other objects despite the fact that the message is in
- : >the public part of the interface. There are two methods to get around
- : >this: typecasting which is a maintanance nightmare, and faking inheritence
- : >which is still a maintainance nightmare. In the VCL Borland often chose to
- : >fake inheritance.
-
- : Unless you are doing something out of the ordinary, you type cast to the
- : lowest common denomiator and then send the message.
-
- : It can however in certain situations be cumbersome. (Rarely though)
- Often. Example below.
-
- : >Lack of generics(templates) means you can't construct decent
- : >container classes.
-
- : Create your own, get free source, and use Polymorphism!
- My point about MI exactly (the polymorphism part).
- 1) Create my own -- great spend my time writing container classes instead of
- applications.
- 2) AFIK they don't exist either free or for money. I guess they are to hard to
- write.
- But it does raise an interesting problem.
- How do you write a class SortedList which maintains a list of objects which
- have a method CompareTo. This lists keeps the objects in sorted order based
- on CompareTo. You also know that
- 1) It will be used over a long period of time, and there will be many different
- classes stored there.
- 2) In some applications, there will be several instances which hold
- different types.
- 3) Some of the objects stored come from classes which have to inherit from
- something else.
- 4) Management insists that programmers only get dcu's-- no source. They
- know that distributing source over the organization causes some of the
- worst maintenance problems.
-
- If you have MI it's easy. Just create a class called SortedObject with
- a virtual method called CompareTo. Store objects of that type in the list.
- An class that need to get stored can then inherit from SortedObject.
- Unfortunately you can't use this in Delphi since you know some of the
- classes already inherit from something else.
-
- If your language is dynamically typed, it's easy. In the sort routine
- send the message CompareTo. Unfortunatly Delphi is statically typed.
-
- So can you solve this problem in Delph? It's easy in Smalltalk,Simula,
- C++, Eiffel( don't know about OOCobol or Ada95, but I suspect it is easy in
- Ada95 ) oh yeah and Java. Since this problem is easy in the mainline OO
- languages, by what justification do you say that Delphi is OO.
- ---------------------
- Thaddeus L. Olczyk
-